3aff0a7c7cff549d66fa6475b467ad2a0f4c4664,portal-impl/src/com/liferay/portal/deploy/hot/PluginPackageHotDeployListener.java,PluginPackageHotDeployListener,reconfigureCaches,#ClassLoader#,260
Before Change
portletPropertiesConfiguration, classLoader,
PropsKeys.EHCACHE_SINGLE_VM_CONFIG_LOCATION));
PortalCacheConfiguratorUtil.reconfigureCaches(
PortalCacheManagerNames.MULTI_VM, classLoader,
getPortalCacheConfigurationURL(
portletPropertiesConfiguration, classLoader,
PropsKeys.EHCACHE_MULTI_VM_CONFIG_LOCATION));
}
private static final Log _log = LogFactoryUtil.getLog(
After Change
}
protected void reconfigureCaches(
ServletContext servletContext, ClassLoader classLoader)
throws Exception {
Configuration portletPropertiesConfiguration = null;
try {
portletPropertiesConfiguration =
ConfigurationFactoryUtil.getConfiguration(
classLoader, "portlet");
}
catch (Exception e) {
if (_log.isDebugEnabled()) {
_log.debug("Unable to read portlet.properties");
}
return;
}
Registry registry = RegistryUtil.getRegistry();
ServiceRegistrar<PortalCacheConfiguratorSettings> serviceRegistrar =
registry.getServiceRegistrar(PortalCacheConfiguratorSettings.class);
Map<String, Object> properties = new HashMap<>();
properties.put(
"portal.cache.manager.name", PortalCacheManagerNames.SINGLE_VM);
serviceRegistrar.registerService(
PortalCacheConfiguratorSettings.class,
new PortalCacheConfiguratorSettings(
portletPropertiesConfiguration.get(
PropsKeys.EHCACHE_SINGLE_VM_CONFIG_LOCATION),
classLoader),
properties);
properties = new HashMap<>();
properties.put(
"portal.cache.manager.name", PortalCacheManagerNames.MULTI_VM);
serviceRegistrar.registerService(
PortalCacheConfiguratorSettings.class,
new PortalCacheConfiguratorSettings(
portletPropertiesConfiguration.get(
PropsKeys.EHCACHE_MULTI_VM_CONFIG_LOCATION),
classLoader),
properties);
servletContext.setAttribute(
_PORTAL_CACHE_CONFIGURATOR_SETTINGS_SERVICE_REGISTAR,